package com.itheima.controller;

import com.itheima.common.PermissionsDto;
import com.itheima.common.Result;
import com.itheima.mapper.APPGMapper;
import com.itheima.pojo.pe.pe_permission_group;
import com.itheima.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

//@RestController
//@RequestMapping("/permissions")
public class PermissionsController {
/*    @Autowired
    private PermissionService permissionservice;
    @PostMapping
    public void add(PermissionsDto permissionsDto){
        permissionservice.add(permissionsDto);
    }
    @GetMapping
    public Result page(Integer page, Integer pagesize,String keyword){
        return permissionservice.findpage(page,pagesize,keyword);
    }
    @PutMapping("/{id}")
    public void update(Integer id,@RequestBody PermissionsDto permissionsDto){
        permissionservice.update(id,permissionsDto);

    }
    @DeleteMapping("/{id}")
    public void delete(Integer id){
        permissionservice.deleteBy(id);
    }
    @GetMapping("/simple")
    public Result simple(String keyword){
        return permissionservice.find(keyword);
    }
    @GetMapping("/{id}")
    public Result xinxi(Integer id,PermissionsDto permissionsDto){

       return permissionservice.xinxi(id,permissionsDto);
    }*/

}
